#pragma once

#include "PLDataTypes.h"

/**
  *	Template class for a geometric vector with two elements
  */
template <typename T>
class PLVec2
{
public:
	PLVec2( const T &x = 0, const T &y = 0 );
	PLVec2<T> GetCWNormal( void ) const;
	const PLVec2<T> &Normalize( void );

	const T &GetX( void ) const;
	const T &GetY( void ) const;

	PLVec2<T> operator+( const PLVec2<T> &vec ) const;

	PLVec2<T> operator*( const double &mult ) const;

	T &operator[]( const PLuint &index );
	const T &operator[]( const PLuint &index ) const;

private:
	/** the two elements of the vector */
	T mVec[2];
};

typedef PLVec2<double> PLVec2d;